package com.tomehay.termprojectmanage_server.utils;

import com.tomehay.termprojectmanage_server.pojo.Model.ChooseStrategy;
import com.tomehay.termprojectmanage_server.pojo.Model.Strategy;
import com.tomehay.termprojectmanage_server.pojo.Model.UploadStrategy;

import java.util.HashMap;
import java.util.Map;

public class StrategyUtil {

    public static Map<Integer, Strategy> strategies;

    public StrategyUtil() {
        strategies = new HashMap<>();
        strategies.put(1, new ChooseStrategy());
        strategies.put(2, new UploadStrategy());
    }

    public static Strategy getStrategy(Integer name) {
        return strategies.get(name);
    }

    public static void addStrategy(Integer name, Strategy strategy) {
        strategies.put(name, strategy);
    }


}
